- Notifications
You must be signed in to change notification settings - Fork 5.8k
/
Copy path1696. Jump Game VI_test.go
53 lines (42 loc) · 808 Bytes
/
1696. Jump Game VI_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package leetcode
import (
"fmt"
"testing"
)
typequestion1696struct {
para1696
ans1696
}
// para 是参数
// one 代表第一个参数
typepara1696struct {
nums []int
kint
}
// ans 是答案
// one 代表第一个答案
typeans1696struct {
oneint
}
funcTest_Problem1696(t*testing.T) {
qs:= []question1696{
{
para1696{[]int{1, -1, -2, 4, -7, 3}, 2},
ans1696{7},
},
{
para1696{[]int{10, -5, -2, 4, 0, 3}, 3},
ans1696{17},
},
{
para1696{[]int{1, -5, -20, 4, -1, 3, -6, -3}, 2},
ans1696{0},
},
}
fmt.Printf("------------------------Leetcode Problem 1696------------------------\n")
for_, q:=rangeqs {
_, p:=q.ans1696, q.para1696
fmt.Printf("【input】:%v 【output】:%v\n", p, maxResult(p.nums, p.k))
}
fmt.Printf("\n\n\n")
}